package com.hspedu.decorator;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/2/24
 * @time 19:39
 */
public class BufferedReader_ extends Reader_{
    private Reader_ reader_;

    public BufferedReader_(Reader_ reader_) {
        this.reader_ = reader_;
    }

    public void readFiles(){
        for (int i = 0; i < 10; i++) {
            reader_.readFile();
        }
    }

    public void readStrings(){
        for (int i = 0; i < 10; i++) {
            reader_.readString();
        }
    }
}

class Test{
    public static void main(String[] args) {
        BufferedReader_ bufferedReader_ = new BufferedReader_(new FileReader_());
        bufferedReader_.readFiles();
    }
}
